package com.wnxy.portal.common.result.impl;

import com.wnxy.portal.common.result.IResultCode;
import lombok.Getter;

// 枚举封装业务级别的状态码
@Getter
public enum BusinessCodeEnum implements IResultCode {

    // 定义枚举对象
    VERRIFY_CODE_IS_NULL(50001,"验证码为空"),
    VERRIFY_CODE_ERROR(50002,"验证码错误"),
    LOGIN_FAILED(50003,"账号或密码错误"),
    PWD_VALIDATE_FAILED(50004,"密码校验失败"),
    ACCOUNT_EXISTS(50005,"账号已存在"),
    EMAIL_EXISTS(50006,"邮箱已存在"),
    STORAGE_IS_NOT_ENOUGH(50007,"库存不足"),
    ORDER_REPEAT_COMMIT(50008,"订单已提交，请勿重复提交");

    private Integer code;
    private String msg;

    BusinessCodeEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
